/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    color: white;
    padding: 2rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 主要内容区域 */
main {
    padding: 2rem 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    main {
        grid-template-columns: 3fr 2fr;
    }
}

/* 聊天区域 */
.chat-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.message {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
}

.message.system {
    background-color: #f1f1f1;
    align-self: flex-start;
}

.message.user {
    background-color: #e3f2fd;
    align-self: flex-end;
    margin-left: auto;
}

.message.assistant {
    background-color: #f0f7ff;
    border-left: 4px solid #6e8efb;
}

.chat-input {
    display: flex;
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

#user-input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
}

#send-button {
    background-color: #6e8efb;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 0 1.5rem;
    margin-left: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

#send-button:hover {
    background-color: #5a7df9;
}

/* 信息区域 */
.info-section {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.info-section h2 {
    color: #6e8efb;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 0.5rem;
}

.info-section p {
    margin-bottom: 1.5rem;
}

.info-section ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-section li {
    margin-bottom: 0.5rem;
}

/* 页脚 */
footer {
    background-color: #343a40;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2rem;
}

footer a {
    color: #a777e3;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 576px) {
    header h1 {
        font-size: 2rem;
    }
    
    .chat-container {
        height: 500px;
    }
    
    .message {
        max-width: 90%;
    }
}